"use strict";
//泛型函数
function getData(value) {
    return value;
}
console.log(getData(123));
console.log(getData('hello'));
function getMin(arr) {
    var minNum = arr[0];
    for (var i = 0; i < arr.length; i++) {
        if (minNum > arr[i]) {
            minNum = arr[i];
        }
    }
    return minNum;
}
console.log(getMin(['a', 'd', 'p']));
console.log(getMin([11, 4, 6]));
//泛型类
var MinClass = /** @class */ (function () {
    function MinClass() {
        this.list = [];
    }
    MinClass.prototype.add = function (num) {
        this.list.push(num);
    };
    MinClass.prototype.min = function () {
        var minNum = this.list[0];
        for (var i = 0; i < this.list.length; i++) {
            if (minNum > this.list[i]) {
                minNum = this.list[i];
            }
        }
        return minNum;
    };
    return MinClass;
}());
var m = new MinClass();
m.add(5);
m.add(100);
m.add(30);
console.log(m.min());
var str = new MinClass();
str.add('o');
str.add('c');
str.add('b');
console.log(str.min());
function create(what) {
    return what;
}
console.log(create({ name: 'lili', age: 19 }));
console.log(create({ type: 'cat' }));
